package com.example.demozy.mapper;

import com.example.demozy.entity.Administrator;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author 王成龙
 */
@Mapper
public interface AdministratorMapper {

    /**
     * 根据用户id获取管理员
     * @param userId
     * @return
     */
    @Select("select admin_id from administrator where user_id = #{userId}")
    Administrator getAdminIdByUserId(int userId);
}
